Crate ppp[][src]

Expand description

A Proxy Protocol Parser written in Rust using nom. Supports both text and binary versions of the header. A general function is provided to parse either version using a single call. When using the general function, performance depends almost entirely on the type of header.

Modules

The error type used by the parsers.

Types representing both text and binary versions of HAProxy’s proxy protocol header.

Functions

A parser that can handle both version 1 and version 2 of the proxy protocol header.

Parses a version 1 header of HAProxy’s proxy protocol. Supports TCP with IPv4 and IPv6 addresses, as well as UNKNOWN address information.

Parse the first 16 bytes of the protocol header; the only required payload. The 12 byte signature and 4 bytes used to describe the connection and header information. The adress portion of the header, as denoted by the last 2 bytes of the required payload, must be present a header with invalid addresses or TLVs (Type-Length-Value) can be determined to be invalid.

Creates a String from a valid Version 1 header. See the protocol specification for the definition of valid text headers.

Creates a String from a valid Version 1 header. See the protocol specification for the definition of valid text headers.